#pragma once
#pragma once
#include <QObject>
#include <QAction>
#include "ModelRenderer.h"
#include "SkeletonHelper.h"

/// @todo: attempt to merge draw_wireframe with draw_wireframe_color?
class SkeletonRenderer : public ModelRenderer{
    Q_OBJECT
         
    /// @{ 
    private:
        QAction* _mode_glline;
        QAction* _mode_mesh;
    /// @}

    /// @{ OpenGL vertex buffers
    private:
        std::vector<unsigned int>  triangles; ///< index array for buffered OpenGL rendering 
        std::vector<unsigned int>  edges;     ///< index array for buffered OpenGL rendering
    /// @}

private:
    SkeletonModel* mesh;
public:
    SkeletonRenderer();
    void setup(Model *model, QGLWidget *widget, QAction *shader);
    void init();
    void render();
private:
    void render_nodes();
    void render_edges();
};
